{{# list_of_servers_is_empty }}
    <div class="empty-page">
        <span class="empty-page-text">{{{ list_of_servers_empty_message }}}</span>
        <button id="button-modal-add-gerrit-server" type="button" class="tlp-button-primary tlp-button-large">
            <i class="fa fa-plus tlp-button-icon"></i> {{ gerrit_add_server }}
        </button>
    </div>
{{/ list_of_servers_is_empty }}

{{^ list_of_servers_is_empty }}
    <button id="button-modal-add-gerrit-server" type="button" class="tlp-button-primary add-gerrit-server-button">
        <i class="fa fa-plus tlp-button-icon"></i> {{ gerrit_add_server }}
    </button>

    {{# list_of_servers }}
        <div id="gerrit-servers-list">
            <section class="tlp-pane">
                <div class="tlp-pane-container">
                    <div class="tlp-pane-header">
                        {{# host }}
                        <h1 class="tlp-pane-title">
                            {{ host }}
                        </h1>
                        {{/ host }}
                        {{^ host }}
                        <h1 class="tlp-pane-title">
                            {{ not_specified_host }}
                        </h1>
                        {{/ host }}
                    </div>
                    <section class="tlp-pane-section gerrit-server-info">
                        <div class="gerrit-server-info-row">

                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_host }}
                                </label>
                                {{# host }}
                                    {{ host }}
                                {{/ host }}
                                {{^ host }}
                                    <p class="tlp-property-empty">{{ empty_content }}</p>
                                {{/ host }}
                            </div>

                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_http_port }}
                                </label>
                                {{# http_port }}
                                    {{ http_port }}
                                {{/ http_port }}
                                {{^ http_port }}
                                    <p class="tlp-property-empty">{{ empty_content }}</p>
                                {{/ http_port }}
                            </div>

                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_use_ssl }}
                                </label>
                                {{# use_ssl }}
                                    <span class="tlp-badge-success">{{ yes }}</span>
                                {{/ use_ssl }}
                                {{^ use_ssl }}
                                    <span class="tlp-badge-danger">{{ no }}</span>
                                {{/ use_ssl }}
                            </div>

                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_gerrit_version }}
                                </label>
                                {{# use_gerrit_2_5 }}
                                    <span class="tlp-badge-primary">2.5</span>
                                {{/ use_gerrit_2_5 }}
                                {{^ use_gerrit_2_5 }}
                                    <span class="tlp-badge-primary">2.8+</span>
                                {{/ use_gerrit_2_5}}
                            </div>
                        </div>

                        <div class="gerrit-server-info-row">
                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_login }}
                                </label>
                                {{# login }}
                                    {{ login }}
                                {{/ login }}
                                {{^ login }}
                                    <p class="tlp-property-empty">{{ empty_content }}</p>
                                {{/ login }}
                            </div>
                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_identity_file }}
                                </label>
                                {{# identity_file }}
                                    {{ identity_file }}
                                {{/ identity_file }}
                                {{^ identity_file }}
                                    <p class="tlp-property-empty">{{ empty_content }}</p>
                                {{/ identity_file }}
                            </div>
                            <div class="tlp-property">
                                <label class="tlp-label">
                                    {{ gerrit_label_auth_type }}
                                </label>
                                {{# is_digest }}
                                    <span class="tlp-badge-secondary">{{ digest }}</span>
                                {{/ is_digest }}
                                {{# is_basic }}
                                    <span class="tlp-badge-secondary">{{ basic }}</span>
                                {{/ is_basic }}
                            </div>
                            <div class="tlp-property git-info-two-ssh-key">
                                <label class="tlp-label">
                                    {{ gerrit_label_replication_key }}
                                </label>
                                {{# replication_key }}
                                    <i class="fa fa-key git-info-two-ssh-key-icon"></i> {{ replication_key_ellipsis_value }}
                                {{/ replication_key }}
                                {{^ replication_key }}
                                    <p class="tlp-property-empty">{{ empty_content }}</p>
                                {{/ replication_key }}
                            </div>
                        </div>
                </div>
                <div class="tlp-pane-container gerrit-server-action-container">
                    <section class="tlp-pane-section gerrit-server-action">
                        <button type="button"
                                class="tlp-button-primary tlp-button-outline action-item gerrit-action-edit-button"
                                data-modal-id="gerrit-edit-modal-{{ id }}"
                        >
                            <i class="fa fa-pencil tlp-button-icon"></i>
                                {{ btn_edit }}
                        </button>
                        {{> admin-plugin-gerrit-modal-edit }}

                        <a type="button"
                           href="?view=gerrit_servers_restriction&action=manage-allowed-projects&gerrit_server_id={{ id }}"
                           class="tlp-button-primary tlp-button-outline gerrit-action-restrict-button"
                           disabled
                        >
                            <i class="fa fa-lock tlp-button-icon"></i>
                            {{ btn_restrict }}
                        </a>

                        {{# is_used }}
                            <button type="submit" class="tlp-button-danger tlp-button-outline tlp-tooltip tlp-tooltip-left"
                                    data-tlp-tooltip="{{ btn_delete_title }}"
                                    disabled>
                                <i class="fa fa-trash-o tlp-button-icon"></i>
                                {{ btn_delete }}
                            </button>
                        {{/ is_used }}
                        {{^ is_used }}
                            <button
                                    type="submit"
                                    class="tlp-button-danger tlp-button-outline gerrit-action-delete-button"
                                    data-modal-id="gerrit-delete-modal-{{ id }}"
                            >
                                <i class="fa fa-trash-o tlp-button-icon"></i>
                                {{ btn_delete }}
                            </button>
                            {{> admin-plugin-gerrit-modal-delete }}
                        {{/ is_used }}
                    </section>
                </div>
                </section>
            </section>
        </div>
    {{/ list_of_servers }}
{{/ list_of_servers_is_empty }}

{{> admin-plugin-gerrit-server-modal }}
